#pragma once

namespace micro{
namespace utils{



class QError
{
	QString		message;
	HRESULT		hresult;
public:
	//QError(HRESULT h){	 hresult = h; message.Format(_T("Code is %ld !"), hresult); }
	QError(){	message.FormatMessage(GetLastError());	}
	QError(const QString & str){ message=str; }
	//HRESULT GetResult()const { return hresult; }
	

	void PrintMessage()
	{ 
		::MessageBox( GetActiveWindow()	, 	message, 
		_T("Error"), MB_OK | MB_ICONSTOP  | MB_APPLMODAL    );
	}
	
};

 
}

}//micro